﻿using System.Collections.ObjectModel;

namespace iStudio.Structure.Engine
{
    public sealed class OutputSampleProvider
    {
        private readonly ObservableCollection<ICustomSampleProvider>  _providers;

        public ObservableCollection<ICustomSampleProvider> Providers
        {
            get
            {
                return _providers;
            }
        }

        public OutputSampleProvider()
        {
            _providers = new ObservableCollection<ICustomSampleProvider> ();
        }

        public void Process (float[] buffer, int offset, int count)
        {
            foreach (ICustomSampleProvider provider in _providers)
            {
                provider.Process (buffer, offset, count);
            }
        }
    }
}
